package ae.pcfc.etks.online.itworx.ehs.web.delegate.impl;

import java.util.List;

import ae.pcfc.etks.online.common.vo.UserDetailVO;
import ae.pcfc.etks.online.fnp.service.types.CancelPaymentAdviceResponse;
import ae.pcfc.etks.online.itworx.ehs.web.delegate.FNPDelegate;
import ae.pcfc.etks.online.itworx.ehs.web.exception.CommunicationException;
import ae.pcfc.etks.online.itworx.ehs.web.exception.FNPServiceExpcetion;
import ae.pcfc.etks.online.itworx.ehs.web.facade.FNPFacade;
import ae.pcfc.etks.online.itworx.ehs.web.model.FNP;
import ae.pcfc.etks.online.itworx.ehs.web.model.FNPFeesService;
import ae.pcfc.etks.online.itworx.ehs.web.model.PaymentAdvice;


public class FNPDelegateImpl extends BaseDelegateImpl implements FNPDelegate {

	public List<FNPFeesService> getServices() throws CommunicationException,FNPServiceExpcetion{

		return serviceLocator.getFacadeService(FNPFacade.class).getServices();
	}

	public List<FNPFeesService> getServiceInfoAndParameters(
			List<String> servicesId) throws CommunicationException,FNPServiceExpcetion {

		return serviceLocator.getFacadeService(FNPFacade.class)
				.getServiceInfoAndParameters(servicesId);
	}

	@Override
	public Double previewPaymentAdvice(FNP fnpModel,UserDetailVO userDetails)
			throws CommunicationException,FNPServiceExpcetion {
		
		return serviceLocator.getFacadeService(FNPFacade.class)
		.previewPaymentAdvice(fnpModel,userDetails);
	}

	@Override
	public PaymentAdvice generatePaymentAdvice(FNP fnpModel,String userName,String transactionNumber,
			UserDetailVO userDetails)
			throws CommunicationException,FNPServiceExpcetion {
		return serviceLocator.getFacadeService(FNPFacade.class)
		.generatePaymentAdvice(fnpModel,
				userName,transactionNumber,userDetails);
	}

	@Override
	public String queryPaymentAdviceStatus(String paymentAdviceNumber)
			throws CommunicationException,FNPServiceExpcetion {
		return serviceLocator.getFacadeService(FNPFacade.class).queryPaymentAdviceStatus(paymentAdviceNumber);
	}
	
	
	@Override
	public CancelPaymentAdviceResponse cancelPaymentAdvice(String transactionNumber, String paymentAdviceNumber, String userName,String message)
		throws CommunicationException,FNPServiceExpcetion{
		return serviceLocator.getFacadeService(FNPFacade.class).cancelPaymentAdvice(transactionNumber, paymentAdviceNumber, userName, message);
	}
	
}
